﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Meqs.Entity
{
    [Serializable]
    public class ExamTeachEducation
    {
        private int _rID;
        private int _examID;
        private int _causeID;
        private int _teacherID;
        private int _classID;
        private string _schoolMark;

        public ExamTeachEducation()
        {
        }

        public ExamTeachEducation(int rID, int examID, int causeID, int teacherID, int classID, string schoolMark)
        {
            _rID = rID;
            _examID = examID;
            _causeID = causeID;
            _teacherID = teacherID;
            _classID = classID;
            _schoolMark = schoolMark;
        }

        public int RID
        {
            get { return _rID; }
            set { _rID = value; }
        }

        public int ExamID
        {
            get { return _examID; }
            set { _examID = value; }
        }

        public int CauseID
        {
            get { return _causeID; }
            set { _causeID = value; }
        }

        public int TeacherID
        {
            get { return _teacherID; }
            set { _teacherID = value; }
        }

        public int ClassID
        {
            get { return _classID; }
            set { _classID = value; }
        }

        public string SchoolMark
        {
            get { return _schoolMark; }
            set { _schoolMark = value; }
        }

        public bool Equals(ExamTeachEducation other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;
            return other._rID == _rID;
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            if (obj.GetType() != typeof (ExamTeachEducation)) return false;
            return Equals((ExamTeachEducation) obj);
        }

        public override int GetHashCode()
        {
            return _rID;
        }
    }
}
